using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UIMapButton : MonoBehaviour
{
    public GameObject MapMin=null;
    public GameObject MapMax=null;
    private Button mapBtn;
    
    static bool mapBtnActive = false;
    
    void Start()
    {
        mapBtn = GetComponent<Button>();
        mapBtn.onClick.AddListener(OnMapClicked);
    }

    
    void OnMapClicked()
    {
        mapBtnActive=!mapBtnActive;
        
        if (mapBtnActive)
        {
            MapMin.SetActive(false);
            MapMax.SetActive(true);
        }
        else
        {
            MapMin.SetActive(true);
            MapMax.SetActive(false);
        }

        
    }
}